
-- $Id: BidFrame.lua 71 2009-04-06 04:43:41Z Fylgjas $

-- ========================================================================= --
-- Copyright © 2009 Thomas ROBERT (aka Fylgjas EU - Marécage de Zangar)      --
-- ========================================================================= --
-- This file is part of FyLooter.                                            --
--                                                                           --
-- FyLooter is free software: you can redistribute it and/or modify it under --
-- the terms of the GNU General Public License as published by the Free      --
-- Software Foundation, either version 3 of the License, or (at your option) --
-- any later version.                                                        --
--                                                                           --
-- FyLooter is distributed in the hope that it will be useful, but WITHOUT   --
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     --
-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for  --
-- more details.                                                             --
--                                                                           --
-- You should have received a copy of the GNU General Public License along   --
-- with FyLooter. If not, see <http://www.gnu.org/licenses/>.                --
-- ========================================================================= --

local revision = tonumber(string.sub("$Rev: 71 $", 7, -3));

if (FyLooter.revision < revision) then
  FyLooter.revision = revision;
end

-- ========================================================================= --



-- ========================================================================= --

-- 
-- FyLooter:CreateBidFrame()
--
function FyLooter:CreateBidFrame(parent)
  -- BidFrame
  BidFrame = CreateFrame("Frame", nil, parent);
  BidFrame:Hide();
  BidFrame:SetHeight(36);
  BidFrame:SetBackdrop(FyLooter.db.settings.backdrop);

  -- BidFrame.NeedButton
  BidFrame.NeedButton = CreateFrame("Button", nil, BidFrame, "UIPanelButtonGrayTemplate");
  BidFrame.NeedButton:SetID(FyLooter.Status.NEED);
  BidFrame.NeedButton:SetWidth(80);
  BidFrame.NeedButton:SetHeight(22);
  BidFrame.NeedButton:SetPoint("LEFT", 7, 0);
  BidFrame.NeedButton:SetText("Need");
  BidFrame.NeedButton:GetNormalTexture():SetVertexColor(0.5, 1, 0.5);
  BidFrame.NeedButton:GetPushedTexture():SetVertexColor(0.5, 1, 0.5);

  -- BidFrame.GreedButton
  BidFrame.GreedButton = CreateFrame("Button", nil, BidFrame, "UIPanelButtonGrayTemplate");
  BidFrame.GreedButton:SetID(FyLooter.Status.GREED);
  BidFrame.GreedButton:SetWidth(80);
  BidFrame.GreedButton:SetHeight(22);
  BidFrame.GreedButton:SetPoint("CENTER");
  BidFrame.GreedButton:SetText("Greed");
  BidFrame.GreedButton:GetNormalTexture():SetVertexColor(0.5, 0.5, 1);
  BidFrame.GreedButton:GetPushedTexture():SetVertexColor(0.5, 0.5, 1);

  -- BidFrame.PassButton
  BidFrame.PassButton = CreateFrame("Button", nil, BidFrame, "UIPanelButtonGrayTemplate");
  BidFrame.PassButton:SetID(FyLooter.Status.PASS);
  BidFrame.PassButton:SetWidth(80);
  BidFrame.PassButton:SetHeight(22);
  BidFrame.PassButton:SetPoint("RIGHT", -7, 0);
  BidFrame.PassButton:SetText("Pass");
  BidFrame.PassButton:GetNormalTexture():SetVertexColor(1, 0.5, 0.5);
  BidFrame.PassButton:GetPushedTexture():SetVertexColor(1, 0.5, 0.5);
  
  return BidFrame;
end

-- ========================================================================= --

